<table>
    <tbody>
        <tr class="prop">
            <td class="name">
                <label for="serialNumber"><g:message code="b2b.dealer.serialNumber.label" default="Dealer Number" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'serialNumber', 'errors')}">
                <g:textField name="serialNumber" maxlength="10" value="${dealerInstance?.serialNumber}" />
            </td>
            <td class="name">
                <label for="name"><g:message code="b2b.dealer.name.label" default="Name" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'name', 'errors')}">
                <g:textField name="name" maxlength="72" value="${dealerInstance?.name}" />
            </td>
        </tr>
    
        <tr class="prop">
            <td class="name">
                <label for="alias"><g:message code="b2b.dealer.alias.label" default="Alias" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'alias', 'errors')}">
                <g:textField name="alias" value="${dealerInstance?.alias}" />
            </td>
            <td class="name">
                <label for="shortcut"><g:message code="b2b.dealer.shortcut.label" default="Shortcut" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'shortcut', 'errors')}">
                <g:textField name="shortcut" maxlength="20" value="${dealerInstance?.shortcut}" />
            </td>
        </tr>
    
        <tr class="prop">
            <td class="name">
                <label for="head"><g:message code="b2b.dealer.head.label" default="Head" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'head', 'errors')}">
                <g:textField name="head" maxlength="30" value="${dealerInstance?.head}" />
            </td>
            <td class="name">
                <label for="contact"><g:message code="b2b.dealer.contact.label" default="Contact" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'contact', 'errors')}">
                <g:textField name="contact" maxlength="30" value="${dealerInstance?.contact}" />
            </td>
        </tr>
    
        <tr class="prop">
            <td class="name">
                <label for="approvalStatus"><g:message code="b2b.dealer.approvalStatus.label" default="Approval Status" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'approvalStatus', 'errors')}">
                <g:textField name="approvalStatus" maxlength="4" value="${dealerInstance?.approvalStatus}" />
            </td>
            <td class="name">
                <label for="pricingMode"><g:message code="b2b.dealer.pricingMode.label" default="Pricing Mode" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'pricingMode', 'errors')}">
                <g:textField name="pricingMode" maxlength="3" value="${dealerInstance?.pricingMode}" />
            </td>
        </tr>
    
        <tr class="prop">
            <td class="name">
                <label for="department"><g:message code="b2b.dealer.department.label" default="Department" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'department', 'errors')}">
                <g:select name="department.id" from="${org.icress.fusion.b2b.Department.list()}" optionKey="id" optionValue="serialNumber" value="${dealerInstance?.department?.id}"  />
            </td>
            <td class="name">
                <label for="salesMan"><g:message code="b2b.dealer.salesMan.label" default="Sales Man" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'salesMan', 'errors')}">
                <g:select name="salesMan.id" from="${org.icress.fusion.b2b.Staff.list()}" optionKey="id" optionValue="name" value="${dealerInstance?.salesMan?.id}"  />
            </td>
        </tr>
 
        <tr class="prop">
            <td class="name">
                <label for="address1"><g:message code="b2b.dealer.address1" default="Address(1)" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'address1', 'errors')}" colspan="3">
                <g:textArea name="address1" maxlength="72" value="${dealerInstance?.address1}" />
            </td>
        </tr> 

        <tr class="prop">
            <td class="name">
                <label for="address2"><g:message code="b2b.dealer.address2" default="Address(2)" /></label>
            </td>
            <td class="value ${hasErrors(bean: dealerInstance, field: 'address2', 'errors')}" colspan="3">
                <g:textArea name="address2" maxlength="72" value="${dealerInstance?.address2}" />
            </td>
        </tr> 
        
    </tbody>
</table>
